package com.logos.stream;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class test02 {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Collections.addAll(list, "张无忌", "周芷若", "赵敏", "张三丰", "张翠山","张良","王二麻子","谢广坤");
        list.stream().filter(s -> s.startsWith("张")).forEach(System.out::println);
        list.stream().skip(3).limit(3).forEach(System.out::println);
    }
}
